/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sistemperpustakaan;

import com.conn.SettingUI;
import com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel;
import java.sql.Connection;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.UIManager;
import sistemperpustakaan.view.FrmLogin;
import sistemperpustakaan.view.FrmMain;
import sistemperpustakaan.view.LaunchProgressBar;

/**
 *
 * @author Eko Aprianto
 */
public class Main {

    private static Connection mConnect;
    private static SettingUI jConfig;

    public Main() {
    }

    public SettingUI getjConfig() {
        return jConfig;
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        jalan();
    }

    public static void initializeLookAndFeel() {
        try {
            UIManager.setLookAndFeel(new NimbusLookAndFeel());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void jalan() {
        initializeLookAndFeel();
        LaunchProgressBar pb = new LaunchProgressBar();
        pb.setVisible(true);
        for (int i = 0; i <= 100; i++) {
            try {
                pb.getProgressBar().setValue(i);
                Thread.sleep(15);
            } catch (InterruptedException ex) {
                Logger.getLogger(LaunchProgressBar.class.getName()).log(Level.SEVERE, null, ex);
            }
        }

        pb.dispose();


        FrmLogin fl = new FrmLogin(null, true);
        fl.setVisible(true);
    }

}
